const puppeteer = require('puppeteer')
async function upload(){
  const brower = await puppeteer.launch({ headless: false})
  const page= await brower.newPage()
  await page.goto("http://www.baidu.com")
 const soutuBtn=  await page.waitForSelector('span.soutu-btn')
  await soutuBtn.click()
const uploadPic=  await page.waitForSelector("input.upload-pic")
  await uploadPic.uploadFile("C:\\Users\\CC\\Desktop\\g.jpg")
}
upload()